package com.audi.view;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.audi.R;
import com.audi.box.objects.LocalData;

public class Customdialog  extends Activity{
	TextView tvmess;
	Button btnok;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.activity_diaglog);
		super.onCreate(savedInstanceState);
		Bundle extras = getIntent().getExtras();
		Intent intent = getIntent();
		String mess = intent.getStringExtra("mess");
		tvmess = (TextView)findViewById(R.id.tvmessd);
		btnok = (Button)findViewById(R.id.btn_ok);
		tvmess.setText(mess);
		btnok.setText("Đồng ý");
		btnok.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
//				Intent i = getBaseContext().getPackageManager()
//			             .getLaunchIntentForPackage( getBaseContext().getPackageName() );
//			i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//			startActivity(i);	
				
			    finish(); // to end the current activity
//				System.exit(0);
			}
		});
		
	}
}
